package com.sjyy.common.authority.enums;

/** 
 * 用户权限 
 */
public enum AuthorityTypeEnum{

	ADMIN_USER_SHOW("查看管理员工信息",0),
	ADMIN_FINACIAL_SHOW("财务主管", 2),
	
	BOARD_USER_LOGIN("ADMIN",29),
	CRM_ADMIN_LOGIN("销售主管",30),
	DC_ADMIN_LOGIN("配送主管",31),
	
	FINACIAL_ORDER_CTRL("订单回款", 24),
	
	CRM_USER_LOGIN("销售", 25),
	PD_SUPPLYUSER_LOGIN("供应商",26),
	
	BASIC_AREA_MANAGER("区域管理",28),

	BASIC_RESTAURANT_SHOW("查看会员信息",1),
	BASIC_RESTAURANT_CTRL("管理会员信息",18),
	BASIC_RESTAURANT_CONFIRM("认证会员",20),
	BASIC_RESTAURANT_PASSWORD("修改密码",33),
	
	BASIC_ORDER_SHOW("查看订单信息",3),
	BASIC_ORDER_CTRL("订单循环权限",4),
	BASIC_ORDER_EDIT("订单编辑权限",15),
	BASIC_ORDER_EXPORT("订单导出权限",16),
	BASIC_ORDER_FINACIAL("订单回款权限",17),
	BASIC_ORDER_CANCEL("订单取消权限",19),
	
	BASIC_ORDER_DETAIL_SHOW("订单详情查看",21),
	BASIC_ORDER_DETAIL_EDIT("订单详情数量编辑",22),
	BASIC_ORDER_DETAIL_MODIFY("订单详情品类修改",23),
	//细化
/*	BASIC_ORDER_DETAIL_REDACT("订单详情编辑",162),
	BASIC_ORDER_DETAIL_ADD("订单详情添加",163),
	BASIC_ORDER_DETAIL_DELETE("订单详情删除",164),*/
	
	/*商品维护*/
	category_maintain_colon_index("访问商品维护",5),
	category_maintain_colon_query("查询采购价",162),
	category_maintain_colon_release("发布",163),
	category_maintain_colon_order("排序",164),
	
	category_maintain_colon_common_new("新增普通商品",165),
	category_maintain_colon_promotion_new("新增促销商品",166),
	
	category_maintain_colon_promotion_edit("编辑采购价",167),
	category_maintain_colon_release_edit("编辑发布价",168),
	category_maintain_colon_commodity_edit("编辑商品",169),
	category_maintain_colon_putaway("上架",170),
	category_maintain_colon_unshelve("下架",171),
	
	category_maintain_colon_material_index("访问原材料关联按钮",172),
	category_maintain_colon_material_add("原材料添加关联",173),
	category_maintain_colon_material_delete("原材料删除关联",174),
	
	/*商品分类管理*/
	category_classify_colon_index("访问商品分类管理页面",175),
	category_classify_colon_add("商品分类新增",176),
	category_classify_colon_modify("商品分类修改",177),
	
	/*配送区域管理*/
	logistics_area_colon_index("访问配送区域管理页面",178),
	logistics_area_colon_add("配送区域新增",179),
	logistics_area_colon_modify("配送区域修改",180),
	logistics_area_colon_delete("配送区域删除",181),
	logistics_area_colon_diliveryman("分配配送员",182),
	logistics_area_colon_interior_export("导出内部配送计划",183),
	logistics_area_colon_tpos_export("导出第三方配送计划",184),
	
	/*会员管理*/
	member_colon_contacts_show("联系人显示",185),
	member_colon_phone_show("电话显示",186),
	member_colon_address_show("地址显示",187),
	member_colon_salesman_show("负责销售显示",188),
	member_colon_diliveryman_show("负责配送显示",189),
	member_colon_payment_show("支付方式显示",190),
	
	member_colon_query("会员查询",191),
	member_colon_account_query("根据账号查询",192),
	member_colon_salesman_query("根据销售查询",193),
	member_colon_diliveryman_query("根据配送查询",194),
	
	member_colon_authentication("认证",195),
	member_colon_password_modify("密码修改",196),
	
	member_colon_restaurantname_edit("编辑饭店名",197),
	member_colon_address_edit("编辑送货地址",198),
	member_colon_linkman_edit("编辑联系人/联系方式",199),
	member_colon_payment_edit("编辑支付方式",200),
	member_colon_status_edit("编辑账号状态",201),
	member_colon_area_edit("编辑所属区域",202),
	member_colon_salesman_edit("编辑负责销售",203),
	member_colon_sorting_edit("编辑分拣备注",204),
	
	/*员工管理*/
	member_employee_colon_add("员工新增",205),
	member_employee_colon_modify("员工修改",206),
	member_employee_colon_forbidden("员工禁用",207),
	
	/*数据报表*/
	data_colon_quotation_query("商品报价单查询",208),
	
	data_colon_firstorder_query("首次下单客户统计查询",209),
	data_colon_order_query("客户订单汇总查询",210),
	data_colon_neworder_query("新客户订单汇总查询",211),
	data_colon_orderdetail_query("客户订单明细查询",212),
	data_colon_neworderdetail_query("新客户订单明细查询",213),
	data_colon_lessthan300_query("不满300元客户数查询",214),
	data_colon_reach300_query("满300元客户数查询",215),
	data_colon_noreceivables_query("销售未回款订单查询",216),
	data_colon_salesmanandclient_query("销售负责客户销售量查询",217),
	data_colon_aweeknoorder_query("连续一周无下单客户查询",218),
	data_colon_aweeknoorderdetail_query("连续一周无下单客户查询",219),
	data_colon_firstordermoney_query("客户首次下单量查询",220),
	data_colon_orderfinancedetail_query("订单财务明细查询",221),
	data_colon_offtake_query("商品销售量查询",222),
	data_colon_purchasenum_query("商品采购次数查询",223),
	data_colon_onestairsaleroom_query("一级分类汇总销售额查询",224),
	data_colon_twostairsaleroom_query("二级分类汇总销售额查询",225),
	data_colon_salesandusers_query("商品销量及用户数查询",226),
	data_colon_putinstorage_query("商品入库查询",227),
	data_colon_putoutstorage_query("商品销售出库查询",228),
	data_colon_manualputoutstorage_query("手动出库查询",229),
	data_colon_profit_query("销售收入查询",230),
	data_colon_returnedmoney_query("销售回款查询",231),
	data_colon_suppliermoney_query("供应商付款查询",232),
	data_colon_returnedmoneyorder_query("回款订单状态查询",233),
	
	
	
	
	
	
	
	
	BASIC_CATEGORY_CTRL("管理商品信息",13),
	BASIC_CATEGORY_PRICE_CTRL("管理商品采购价",27),
	
	BASIC_CATEGORYTYPE_SHOW("查看商品分类信息",6),
	BASIC_CATEGORYTYPE_CTRL("管理商品分类信息",14),
	
	PD_PURCHASE_SHOW("查看采购管理",7),
	PD_RECEIVE("确认入库权限",8),
	PD_STOCK_SHOW("查看库存管理",10),
	PD_SUPPLY_SHOW("查看供应商管理",11),
	PD_GODOWNINFO_SHOW("查看入库详情",32),
	
	PD_PURCHASER_APP("采购APP登陆",9),
	PD_DELIVER_APP("配送APP登陆", 12),
	
	blank("预留权限",34),
	/** 
	 * 基础数据维护
	 */
	// 仓储
	dc_colon_index("访问配送中心维护",35),
	dc_colon_query("查询配送中心",36),
	dc_colon_new("新增配送中心",37),
	dc_colon_show("查看配送中心",38),
	dc_colon_save("保存配送中心",39),
	dc_colon_edit("编辑配送中心",40),
	dc_colon_delete("删除配送中心",41),
	
	category_location_colon_index("访问商品货位",42),
	category_location_colon_query("查询商品货位",43),
	category_location_colon_save("保存商品货位",44),
	category_location_colon_delete("删除商品货位",45),
	category_location_colon_new("新增商品货位",46),
	category_location_colon_edit("编辑商品货位",47),
	
	/** 
	 * 入库管理
	 */
	// 采购入库
	purchase_instock_colon_index("访问采购入库",48),
	purchase_instock_colon_query("查询采购入库信息",49),
	purchase_instock_colon_new("生成入库单",50),
	purchase_instock_colon_edit("编辑采购入库信息",51),
	purchase_instock_colon_detail_index("查看采购入库详情",52),
	purchase_instock_colon_verify("提交采购入库信息",53),
	purchase_instock_colon_pass("审核通过采购入库信息",54),
	purchase_instock_colon_refuse("拒绝通过采购入库信息",55),
	purchase_instock_colon_print("打印采购入库信息",56),
	
	purchase_instock_colon_detail_edit("编辑采购详情",57),
	purchase_instock_colon_detail_save("保存采购详情",58),
	purchase_instock_colon_detail_delete("删除采购详情",59),
	
	// 退货、盘库入库
	return_instock_colon_index("访问退货/盘库入库",60),
	return_instock_colon_query("查询退货/盘库入库",61),
	return_instock_colon_new("新增退货/盘库入库",62),
	return_instock_colon_edit("编辑退货/盘库入库",63),
	return_instock_colon_delete("删除退货/盘库入库",64),
	return_instock_colon_verify("提交退货/盘库入库",65),
	return_instock_colon_pass("审核通过退货/盘库入库",66),
	return_instock_colon_refuse("拒绝通过退货/盘库入库",67),
	return_instock_colon_print("打印退货/盘库入库",68),
	
	return_instock_colon_detail_index("查看退货/盘库入库详情",69),
	return_instock_colon_detail_new("新增退货入库详情",70),
	return_instock_colon_detail_edit("编辑退货入库详情",71),
	return_instock_colon_detail_save("保存退货入库详情",72),
	return_instock_colon_detail_delete("删除退货入库详情",73),
	
	/** 
	 * 打包管理
	 */
	pack_colon_index("访问打包管理",74),
	pack_colon_query("查询打包单",75),
	pack_colon_show("查看打包单详情",76),
	pack_colon_totally("推送到理货",77),
	pack_colon_edit("编辑打包单详情",159),
	
	pack_colon_detail_query("查询打包单详情",78),
	pack_colon_detail_show("查询打包记录的商品详情",79),
	pack_colon_detail_new("新增打包商品详情",80),
	pack_colon_detail_edit("编辑打包商品详情",81),
	pack_colon_detail_submit("提交打包商品详情",82),
	pack_colon_detail_print("打印打包单详情",83),
	
	/** 
	 * 理货管理
	 */
	tally_colon_index("访问理货管理",84),
	tally_colon_query("查询理货单",85),
	tally_colon_print("打印理货单",86),
	tally_colon_toputaway("推送到上架",87),
	tally_colon_detail_index("查看理货单详情列表",88),
	
	tally_colon_detail_query("查询理货单详情",89),
	tally_colon_detail_show("查看理货单详情",90),
	tally_colon_detail_edit("编辑理货单详情",91),
	tally_colon_detail_save("保存理货单详情",92),
	tally_colon_detail_submit("提交理货单详情",93),
	
	/** 
	 * 上架管理
	 */
	putaway_colon_index("访问上架管理",94),
	putaway_colon_query("查询上架单",95),
	putaway_colon_print("打印上架单",96),
	putaway_colon_tostock("提交修改库存",97),
	putaway_colon_detail_index("查看上架单详情列表",98),
	
	putaway_colon_detail_query("查询上架单详情",99),
	putaway_colon_detail_show("查看上架单详情",100),
	putaway_colon_detail_edit("编辑上架单详情",101),
	putaway_colon_detail_save("保存上架单详情",102),
	putaway_colon_detail_submit("提交上架单详情",103),
	
	/** 
	 * 库存管理
	 */
	stockinit_colon_index("访问出库初始化录入",104),
	stockinit_colon_query("查询库存初始化",105),
	stockinit_colon_delete("删除库存初始化信息",106),
	stockinit_colon_save("保存库存初始化信息",107),
	
	stock_colon_index("访问库存信息",108),
	stock_colon_detail_index("查看库存变动信息",109),
	
	/** 
	 * 盘库管理
	 */
	inventory_colon_index("访问盘库管理",110),
	inventory_colon_new("新增盘库总表",111),
	inventory_colon_detail_index("查看盘库明细表",112),
	inventory_colon_delete("删除盘库总表",113),
	
	inventory_colon_detail_save("保存盘库明细表",114),
	inventory_colon_detail_submit("提交盘库明细表",115),
	inventory_colon_detail_pass("审核通过盘库明细",116),
	inventory_colon_detail_refuse("拒绝通过盘库明细",117),
	inventory_colon_detail_history("查看盘库商品历史盘库记录",118),
	inventory_colon_detail_print("打印盘库明细表",119),
	
	/** 
	 * 出库管理
	 */
	// 未上架损耗
	notputawayloss_colon_index("访问未上架损耗",120),
	notputawayloss_colon_query("查询未上架损耗单",121),
	notputawayloss_colon_new("新建未上架损耗单",122),
	notputawayloss_colon_detail_new("添加未上架损耗记录",123),
	notputawayloss_colon_verify("提交审核未上架损耗单",124),
	notputawayloss_colon_delete("删除未上架损耗单",125),
	notputawayloss_colon_pass("审核通过未上架损耗单",126),
	notputawayloss_colon_refuse("拒绝通过未上架损耗单",127),
	notputawayloss_colon_edit("编辑已拒绝的未上架损耗单",128),
	notputawayloss_colon_show("查看未上架损耗单详情",129),
	notputawayloss_colon_print("打印未上架损耗",161),
	
	notputawayloss_colon_detail_edit("编辑未上架损耗记录",130),
	notputawayloss_colon_detail_save("保存未上架损耗记录",131),
	notputawayloss_colon_detail_delete("删除未上架损耗记录",132),
	
	// 商品出库
	outboundorder_colon_index("访问出库单管理",133),
	outboundorder_colon_query("查询商品出库单",134),
	outboundorder_colon_new("生成商品出库单",135),
	outboundorder_colon_show("查看商品出库单详情",136),
	outboundorder_colon_tostock("出库单商品库存出库",137),
	outboundorder_colon_print("打印商品出库单",138),
	
	// 损耗出库
	lossorder_colon_index("访问损耗出库",139),
	lossorder_colon_query("查询损耗出库单",140),
	lossorder_colon_new("新建损耗出库单",141),
	lossorder_colon_detail_new("添加损耗记录",142),
	lossorder_colon_submit("提交审核损耗出库单",143),
	lossorder_colon_delete("删除损耗出库单",144),
	lossorder_colon_verify("审核损耗出库单",145),
	lossorder_colon_pass("审核通过损耗出库单",146),
	lossorder_colon_refuse("拒绝通过损耗出库单",147),
	lossorder_colon_show("查看已审核的损耗出库单",148),
	lossorder_colon_edit("编辑已拒绝的损耗出库单",149),
	lossorder_colon_print("打印损耗出库单",160),
	
	lossorder_colon_detail_edit("编辑损耗记录",150),
	lossorder_colon_detail_save("保存损耗记录",151),
	lossorder_colon_detail_delete("删除损耗记录",152),
	
	/** 
	 * 毛利率
	 */
	rate_colon_index("访问毛利率",153),
	rate_colon_category_index("商品毛利率",154),
	
	/**
	 * 流水信息
	 */
	commodity_colon_index("访问流水信息",236),
	commodity_colon_query("查询流水信息",237),
	commodity_colon_export("导出流水信息",238),
	commodity_colon_history_index("访问流水信息操作记录",239),
	/**
	 * 标件库存信息
	 */
	tender_colon_index("访问标件商品库存",240),
	tender_colon_query("查询标件商品库存",241),
	tender_colon_export("导出标件商品库存",242),
	tender_colon_history_index("访问标件商品库存操作记录",243),
	
	/** 
	 * 商户分类管理
	 */
	assortment_colon_index("访问商户分类管理",155),
	
	/** 
	 * 商户商圈管理
	 */
	tradearea_colon_index("访问商户商圈管理",156),
	
	/** 
	 * 商户拜访管理
	 */
	visit_colon_index("访问商户拜访管理",157),
	
	/** 
	 * 销售区域管理
	 */
	salearea_colon_index("访问销售区域管理",158),
	;
	private String name;
	private int index;

	private AuthorityTypeEnum(String name, int index) {
		this.name = name;
		this.index = index;
	}

	public static String getAuthorityTypeStr(int index) {
		for (AuthorityTypeEnum a : AuthorityTypeEnum.values()) {  
	        if (a.getIndex() == index) {  
	            return a.name;  
	        }  
	    }  
	    return null;  
	}
	
	public static AuthorityTypeEnum getAuthorityType(int index) {
		for (AuthorityTypeEnum a : AuthorityTypeEnum.values()) {  
	        if (a.getIndex() == index) {  
	            return a;  
	        }  
	    }  
	    return null;  
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

}